﻿using System;
using System.Globalization;
using System.Windows.Data;

namespace CloudClipboardSync.Converters
{
    class NegateConverter: IValueConverter
    {
        #region IValueConverter Members

        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return value is bool && !(bool) value;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return value is bool && !(bool) value;
        }

        #endregion
    }
}
